home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_500 / wiconify / wiconcalls.lzh / wStructs.h < prev   
C/C++ Source or Header  |  1991-04-19  |  5KB  |  122 lines

  1. /*
  2.  *  WICONIFY    A utility that allows you to iconify any Intuition window
  3.  *              on any screen, and to open WB windows on any screen.
  4.  *
  5.  *  wStructs.h  The main internal structures used by wIconify.
  6.  *
  7.  *  Copyright 1990 by Davide P. Cervone, all rights reserved.
  8.  *  You may use this code, provided this copyright notice is kept intact.
  9.  */
  10.  
  11. #define WICONREF    struct wIconRef
  12. #define WSCREEN     struct wScreen
  13.  
  14. #include "wIcon.h"
  15.  
  16.  
  17. /*
  18.  *  The is the internal representation of an icon as seen by wIconify.
  19.  *  Each wScreen has a linked list of wIconRefs that are on that screen.
  20.  *  A copy of the original wIcon structure is keep within the wIconRef.
  21.  *  When the wIconCalls library returns icon pointers, it is really 
  22.  *  giving pointers to wIconRefs, not wIcons.  The additional flags
  23.  *  defined below are for system use only, and may not be specified
  24.  *  by the user in a wIcon.Flags field.
  25.  */
  26.  
  27. struct wIconRef
  28. {
  29.    struct wIconRef *Next,*Prev;
  30.    struct Window *Window;           /* window associated to icon */
  31.    struct wScreen *Screen;          /* wScreen where this window lives */
  32.    struct wGadget *Gadget;          /* gadget in use on backdrop window */
  33.    struct wIcon Icon;               /* icon images, flags, etc. */
  34.       #define WI_DRAGGING           BIT(4)  /* icon is being dragged */
  35.       #define WI_BACKDROPCHANGE     BIT(5)  /* BACKDROP flags was changed */
  36.       #define WI_REFRESHCHANGE      BIT(6)  /* SMART_REFRESH flag was changed */
  37.       #define WI_NOCARECHANGE       BIT(7)  /* NOCAREREFRESH changed */
  38.       #define WI_SYSICON            BIT(8)  /* wIconify allocated it */
  39.       #define WI_SCREENICON         BIT(10) /* icon is for a screen */
  40.       #define WI_SYSTEMFLAGS        0x020005F4  /* can't be set by user */
  41.       #define WI_CHANGEBITS\
  42.          (WI_BACKDROPCHANGE| WI_REFRESHCHANGE| WI_NOCARECHANGE)
  43. };
  44.  
  45. #undef  WICONREF
  46. typedef struct wIconRef WICONREF;
  47.  
  48.  
  49. /*
  50.  *  Each screen with a wIconify window has an associated wScreen structure.
  51.  *  These maintian the information needed to add and remove icons on a
  52.  *  screen, and to close the screen safely.
  53.  */
  54.  
  55. struct wScreen
  56. {
  57.    struct wScreen *Next,*Prev;
  58.    struct Screen *Screen;       /* pointer to screen */
  59.    struct Window *BackDrop;     /* pointer to wIconify backdrop window */
  60.    struct wbWindow *Window;     /* list of wbWindows openned by wIconify */
  61.    struct wIconRef *IconRef;    /* list of IconRef's for this screen */
  62.    APTR  CloseTask;             /* pointer to task waiting to close screen */
  63.    ULONG CloseSignal;           /*  signal to tell task it's OK to close */
  64.    ULONG Flags;
  65.       #define WI_CLOSING    BIT(0)  /* screen is being closed */
  66.       #define WI_WSCREEN    BIT(1)  /* wIconify opened this screen */
  67.       #define WI_STARTDRAG  BIT(3)  /* Icons are being pressed */
  68. /*    #define WI_DRAGGING   BIT(4)  */
  69.       #define WI_REFRESH    BIT(5)  /* screen icons should be refreshed */
  70.       #define WI_CLEARIT    BIT(6)  /* screen should be cleared first */
  71.       #define WI_LAYERLOCK  BIT(7)  /* the screens layerinfo is locked */
  72.    struct wGadget *Selected;    /* pointer to first selected icon's gadget */
  73.    struct wScreen *NextRefresh; /* pointer to next screen needing refresh */
  74.    WICONREF Icon;               /* the screen's icon */
  75. };
  76.  
  77. #undef  WSCREEN
  78. typedef struct wScreen WSCREEN;
  79.  
  80.  
  81. /*
  82.  *  Each WB window that has been openned on a screen other than the real
  83.  *  WB screen gets one of these structures.  These are used to tell
  84.  *  when it is safe to close a screen.
  85.  */
  86.  
  87. struct wbWindow
  88. {
  89.    struct wbWindow *Next,*Prev;
  90.    struct Window *Window;           /* window opened on WB screen */
  91.    struct wScreen *Screen;          /* screen that was WB screen */
  92. };
  93.  
  94. typedef struct wbWindow WBWINDOW;
  95.  
  96.  
  97. /*
  98.  *  An exteneded Gadget definition that includes the gadget's IText,
  99.  *  and BoolInfo, as well as pointers used in multiple selection.
  100.  */
  101.  
  102. struct wGadget
  103. {
  104.    struct Gadget Gadget;                    /* actual Gadget structure */
  105.    struct IntuiText IText;                  /* gadget's text */
  106.    struct wGadget *NextSelect,*PrevSelect;  /* linked list of gadgets */
  107.    struct BoolInfo Mask;                    /* the gadget Mask */
  108. };
  109.  
  110. typedef struct wGadget WGADGET;
  111.  
  112.  
  113. /*
  114.  *  Each screen in the ignored-screen list has one of these.
  115.  */
  116.  
  117. struct Ignore                               /* screens to ignore */
  118. {
  119.    struct Ignore *Next;                     /* linked list of them */
  120.    char *Title;                             /* ignore screens of this title */
  121. };
  122.